﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BanVeXemPhim_Presentation
{
    public class GheControl
    {
        private GheDAO _gheDao;

        public GheDAO GheDao
        {
            get { return _gheDao; }
            set { _gheDao = value; }
        }
        public GheControl()
        {
            _gheDao=new GheDAO();
        }
        public GheDTO[] LayDanhSachGheTheoRap(int idRapChieu)
        {
            return _gheDao.LayDanhSachGheCuaRapChieu(idRapChieu);
        }

        public GheDTO[] LayDanhSachGheDaDatTheoXuatChieu(XuatChieuDTO xuatChieu)
        {
            return _gheDao.LayDanhSachGheDaDatTheoXuatChieu(xuatChieu);
        }

        public  void CapNhatDanhSachGhe(GheDTO[] DsGhe)
        {
            _gheDao.CapNhatDanhSachGhe(DsGhe);
        }

        public void KhoiTaoDanhSachGheChoRap(RapChieuDTO rapchieuInfo)
        {
            _gheDao.KhoiTaoDanhSachGheChoRap(rapchieuInfo);
        }

        public void CapNhatTheoSoLuongHangCot(RapChieuDTO newrapChieuDto, int OldHang, int OldCot, int SoHangDaTao, int SoCotDaTao)
        {
            _gheDao.CapNhatTheoSoLuongHangCot(newrapChieuDto, OldHang, OldCot, SoHangDaTao, SoCotDaTao);
        }

        public GheDTO[] LayDanhSachGheDangSuDungTheoRap(int idrap)
        {
            return _gheDao.LayDanhSachGheDangSuDungCuaRapChieu(idrap);
        }
    }
}
